<link rel="stylesheet" href="/static/cloud/css/cloud.css" />
<style type="text/css">
	.content{margin:20px;}
	.content ul{padding-top: 10px;padding-bottom: 10px}
	.content .layui-nav .url{padding-right: 0.5rem;padding-left: 0.5rem;cursor: pointer;text-align: center;line-height: 40px}
	.content .bar{margin-bottom: 0.5rem}
	.content .layui-nav{background: white;color: #6d6d6d;padding: 0}
	.content .table_file_name{color: #00986f;}
	.content .table_file_name:hover{cursor: pointer;color: #5fb878;}
	.content .forbid{color: #cacaca}
</style>
<div class="content">
	<!-- <button type="button" class="layui-btn url-jump layui-btn-normal" data-href="/index/offinedownload_list?type=1">离线下载</button> -->
</div>
<script type="text/javascript">
	layui.use(['table'],function(){
		var table=layui.table,$=layui.$;
		$("title").text('更多 - 私有云盘');

		var type=app.parseUrl().params.type||1;
		var url=['/api/share/getList']
		console.log(type);
		app.setTopMenu('/index/tools');
		
		app.ajaxPost("/api/tool/getToolList",{},function(res){
			if(res.err_code==0){
				for (let i = 0; i < res.data.length; i++) {
					const element = res.data[i];
					addButton(element.title, element.url)
				}
			}
			// 跳转页面
			$('.content .url-jump').click(function () {
				app.go($(this).attr('data-href'))
			})
			$('.content .layui-nav .url').click(function () {
				app.go($(this).attr('data-href'))
			})

		})

		function addButton(title,url) {
			var html= '<button type="button" class="layui-btn url-jump layui-btn-normal" data-href="'+ url+'">'+ title+'</button>'
			$(".content").append(html)
		}

	})
</script>